#ifndef PARTICLE_GROUP
#define PARTICLE_GROUP

#include <list>
#include <D3DX11.h>
#include <D3Dcompiler.h>
#include <xnamath.h>
#include "..\..\Utils\CustomEffect.h"
#include "..\..\Utils\TextureRenderer.h"
#include "..\Drawable.h"

using namespace Drawables;
class ParticleGroup : Drawable
{
public:
	ParticleGroup(int initialSize, bool explosion, bool continuous, std::list<XMFLOAT3> particlePositions, XMFLOAT3 position);
	void SetupTextures();
	void Update(float dt );
	void Draw();

	void SetDrawEffect( Utils::CustomEffect* effect){
		this->particleDrawEffect= effect;
	};

	void SetUpdateEffect( Utils::CustomEffect* effect){
		this->particleUpdateEffect= effect;
	};

private:

	int initialSize;
	bool explode;
	bool continousStream;

	std::list<XMFLOAT3> particlePositions;
	XMFLOAT3 position;

	TextureRenderer* textureRenderer;

	ID3D11Texture2D* positionAndLifeTexture;
	ID3D11Texture2D* velocityTexture;

	Utils::CustomEffect* particleDrawEffect;
	Utils::CustomEffect* particleUpdateEffect;
};

#endif

